-- GENERATED SPELL FOR [Nathanos Blightcaller] --


function spell0_11878(pUnit, Event) --@Backhand,n/a--
pUnit:FullCastSpellOnTarget(6253,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11878', 2304, 1)
end

function spell1_11878(pUnit, Event) --@Multi-Shot,n/a--
pUnit:FullCastSpellOnTarget(18651,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11878', 614, 1)
end

function spell2_11878(pUnit, Event) --@Psychic Scream,Self--
pUnit:FullCastSpellOnTarget(13704,pUnit)
pUnit:RegisterEvent('Sorts_11878', 6289, 1)
end

function spell3_11878(pUnit, Event) --@Shadow Shot,n/a--
pUnit:FullCastSpellOnTarget(18649,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11878', 0, 1)
end

function spell4_11878(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(16100,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11878', 598, 1)
end

function Sorts_11878(pUnit, Event)
local choix_sorts_11878 = math.random(0, 4)
if choix_sorts_11878 == 0 then
pUnit:RegisterEvent('spell0_11878', 1, 1)
end
if choix_sorts_11878 == 1 then
pUnit:RegisterEvent('spell1_11878', 1, 1)
end
if choix_sorts_11878 == 2 then
pUnit:RegisterEvent('spell2_11878', 1, 1)
end
if choix_sorts_11878 == 3 then
pUnit:RegisterEvent('spell3_11878', 1, 1)
end
if choix_sorts_11878 == 4 then
pUnit:RegisterEvent('spell4_11878', 1, 1)
end
end

function mob11878_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11878', math.random(1500, 3000), 1)
end

function mob11878_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11878_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11878_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11878, 1, 'mob11878_Action')
RegisterUnitEvent(11878, 2, 'mob11878_Leave')
RegisterUnitEvent(11878, 3, 'mob11878_Kill')
RegisterUnitEvent(11878, 4, 'mob11878_Die')
